//
//  AOBasicViewController.m
//  ChengXinBao
//
//  Created by RongZhou on 17/2/13.
//  Copyright © 2017年 RongZhou. All rights reserved.
//

#import "AOBasicViewController.h"
#import "JHUD.h"
@interface AOBasicViewController ()
@property (nonatomic) JHUD *hudView;
@end

@implementation AOBasicViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.hudView = [[JHUD alloc]initWithFrame:self.view.bounds];
    self.hudView.center = self.view.center;
    self.hudView.alpha = 1;

    // Do any additional setup after loading the view.
}
- (void)startWait{
    NSMutableArray * images = [NSMutableArray array];
    for (int index = 0; index <= 19; index++) {
        NSString * imageName = [NSString stringWithFormat:@"%d.png",index];
        UIImage *image = [UIImage imageNamed:imageName];
        [images addObject:image];
    }
    self.hudView.indicatorViewSize = CGSizeMake(80, 80);
    self.hudView.customAnimationImages = images;
    self.hudView.messageLabel.text = @"请稍候,正在加载...";
    [self.hudView showAtView:self.view hudType:JHUDLoadingTypeCustomAnimations];
    
}

- (void)stopWait{
    [self.hudView hide];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
